Skip to content

Add type completeness pre-commit hook#16744

Merged
desertaxle merged 2 commits intomainfrom
type-completeness-precommit-hook
Jan 16, 2025
Merged

Add type completeness pre-commit hook#16744
desertaxle merged 2 commits intomainfrom
type-completeness-precommit-hook

Conversation

@desertaxle
Copy link
Member

@desertaxle desertaxle commented Jan 16, 2025

Now that prefect is 100% type complete, this PR adds a pre-commit hook help catch additions to the public API that are missing type hints.

This PR also removes the GitHub Actions workflow that was previously performing type completeness checks.

Closes #16292

@desertaxle desertaxle added the development Tech debt, refactors, CI, tests, and other related work. label Jan 16, 2025
Comment on lines +42 to +45
if TYPE_CHECKING:
StreamHandler = logging.StreamHandler[TextIO]
else:
StreamHandler = logging.StreamHandler
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this to ensure the type completeness check is consistent across versions.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 16, 2025

CodSpeed Performance Report

Merging #16744 will not alter performance

Comparing type-completeness-precommit-hook (4b818ee) with main (ccbf65f)

Summary

✅ 2 untouched benchmarks

@desertaxle desertaxle marked this pull request as ready for review January 16, 2025 16:38
@desertaxle desertaxle merged commit e59b65a into main Jan 16, 2025
51 checks passed
@desertaxle desertaxle deleted the type-completeness-precommit-hook branch January 16, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development Tech debt, refactors, CI, tests, and other related work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Prefect 100% type complete

2 participants